type service = {
  MOCK: string;
  MANGMENT: string;
  EXAM: string;
  REPORT: string;
};
// dev 环境
const dev_url = "/api";
const dev_host_url = "https://bucket-test-03.oss-cn-beijing.aliyuncs.com";
const dev_service: service = {
  MOCK: ``,
  MANGMENT: `${dev_url}`,
  EXAM: `${dev_url}/exam/api/v1`,
  REPORT: `${dev_url}/report/api/v1`
};
// 测试环境
const sta_url = "https://supernova-api.igky.cc";
const sta_serice: service = {
  MOCK: ``,
  MANGMENT: `${sta_url}/management/api/v1`,
  EXAM: `${sta_url}/exam/api/v1`,
  REPORT: `${sta_url}/report/api/v1`
};
// 生产环境
const prod_url = "https://383vm21556.eicp.vip/RuoYiApi";
const prod_server: service = {
  MOCK: ``,
  MANGMENT: `${prod_url}`,
  EXAM: `${prod_url}/exam/api/v1`,
  REPORT: `${prod_url}/report/api/v1`
};

let config: service;
let fileHost: string;
let socketUrl = "";
let wsURL = "";
switch (import.meta.env.MODE) {
  case "development":
    config = dev_service;
    fileHost = dev_host_url;
    socketUrl = "http://localhost:3000";
    wsURL = "ws://127.0.0.1:7880";
    break;
  case "staging":
    config = sta_serice;
    fileHost = dev_host_url;

    break;
  case "production":
    config = prod_server;
    fileHost = dev_host_url;
    socketUrl = "http://47.120.58.223:7777";
    wsURL = "wss://wangli-bkzhjkbc.livekit.cloud";
    break;
  default:
    break;
}
export { config, fileHost, socketUrl, wsURL };
